import { nextTick } from "vue";
import store from "@/store"

export const errorHandler = (app)=> {
    app.config.errorHandler = (err, vm, info) => {
        console.error('异常消息:', err, vm, info);
        nextTick(()=> {
            store.dispatch("app/hasError", true);
        })
    }
}